<?php

$setting = array();

/* Creatic : Theme Styles
/*---------------------------------------------------------------------------*/

$setting['sections']['theme-styles'] = array(
	'title'		=> 'Theme Styles',
	'tab'		=> 'theme'
);

//! Theme Styles
$setting[] = array(
	'id'		=> 'theme_style',
	'label'		=> 'Style',
	'section'	=> 'theme-styles',
	'type'		=> 'select',
	'choices'	=> FeatherTheme::styles()
);


/* Creatic : Blog Navigation
/*---------------------------------------------------------------------------*/

$setting['sections']['blog-nav'] = array(
	'title'		=> 'Blog Navigation',
	'tab'		=> 'theme'
);

//! Ajax Navigation
$setting[] = array(
	'id'		=> 'theme_style',
	'label'		=> 'Ajax Naviation',
	'section'	=> 'blog-nav',
	'type'		=> 'checkbox',
	'choices'	=> array(
		'theme_blog_ajaxnav' => 'Load additional items via AJAX'
	)
);


/* Creatic : Author Block
/*---------------------------------------------------------------------------*/

$setting['sections']['author-block'] = array(
	'title'		=> 'Author Block',
	'tab'		=> 'theme'
);

//! Disable
$setting[] = array(
	'id'		=> 'theme_author_block',
	'label'		=> 'Disable',
	'section'	=> 'author-block',
	'type'		=> 'checkbox',
	'choices'	=> array(
		'theme_disable_author'=>'Disable author block on single post pages'
	)
);


/* Creatic : Footer Widgets
/*---------------------------------------------------------------------------*/

$setting['sections']['footer-widgets'] = array(
	'title'		=> 'Footer Widgets',
	'tab'		=> 'theme'
);

//! Disable
$setting[] = array(
	'id'		=> 'footer_widgets',
	'label'		=> 'Enable',
	'section'	=> 'footer-widgets',
	'type'		=> 'checkbox',
	'choices'	=> array(
		'footer_widgets' => 'Enable footer widgets',
		'footer_widgets_portfolio' => 'Enable footer widgets on portfolio pages'
	)
);


/* Creatic : Sidebar Links
/*---------------------------------------------------------------------------*/

$setting['sections']['sidebar-links'] = array(
	'title'		=> 'Sidebar Links',
	'tab'		=> 'theme'
);

//! Number of Links
$setting[] = array(
	'id'		=> 'theme_sidebar_num',
	'label'		=> 'Number of Links',
	'section'	=> 'sidebar-links',
	'type'		=> 'select',
	'choices'	=> range(0,10)
);

//! Sidebar Link Items
if(FeatherTheme::get_option('theme_sidebar_num')) {
	$sblinknum = FeatherTheme::get_option('theme_sidebar_num');

	for($i=1;$i<=$sblinknum;$i++) {
		$setting[] = array(
			'id'		=> $i,
			'label'		=> 'Link '.$i,
			'callback'	=> 'FeatherTheme::print_field_sidebar_links',
		);
	}
}


/* Portfolio : Enable
/*---------------------------------------------------------------------------*/

$setting['sections']['portfolio'] = array(
	'title'		=> 'Post Type',
	'tab'		=> 'portfolio'
);

//! Enable
$setting[] = array(
	'id'		=> 'theme_portfolio',
	'label'		=> 'Enable',
	'section'	=> 'portfolio',
	'type'		=> 'checkbox',
	'choices'	=> array(
		'theme_portfolio' => 'Enable portfolio custom post type'
	)
);


/* Portfolio : Navigation
/*---------------------------------------------------------------------------*/

$setting['sections']['portfolio-nav'] = array(
	'title'		=> 'Navigation',
	'tab'		=> 'portfolio'
);

$setting[] = array(
	'id'		=> 'theme_portfolio_ajaxnav',
	'label'		=> 'AJAX Navigation',
	'section'	=> 'portfolio-nav',
	'type'		=> 'checkbox',
	'choices'	=> array(
		'theme_portfolio_ajaxnav'=>'Load additional items via AJAX '.'<small>'.
			'<strong>[ standard nav shows in IE &lt; 9 ]</strong></small>'
	)
);


/* Portfolio : Slugs
/*---------------------------------------------------------------------------*/

$setting['sections']['portfolio-url'] = array(
	'title'		=> 'Rewrite Slugs',
	'tab'		=> 'portfolio'
);

//! Post Type
$setting[] = array(
	'id'		=> 'theme_portfolio_rewrite_type',
	'label'		=> 'Post Type',
	'section'	=> 'portfolio-url',
	'type'		=> 'text',
	'class'		=> 'medium-text'
);

//! Category
$setting[] = array(
	'id'		=> 'theme_portfolio_rewrite_category',
	'label'		=> 'Category',
	'section'	=> 'portfolio-url',
	'type'		=> 'text',
	'class'		=> 'medium-text'
);


// Is portfolio enabled ?
if(FeatherTheme::get_option('theme_portfolio')):

	// Get portfolio categories
	$port_cats = get_categories(
		array(
			'taxonomy'	 => 'portfolio_category',
			'orderby'	 => 'name',
			'hide_empty' => 0
		)
	);

	// Set portfolio category template fields
	$port_cat_fields = array();
	$port_cat_templates = array();

	// Templates
	for($i=1;$i<=12;$i++) {
		$port_cat_templates[$i]='Template '.$i;
	}


/* Portfolio : Category Templates
/*---------------------------------------------------------------------------*/
$setting['sections']['portfolio-cat'] = array(
	'title'		=> 'Category Templates',
	'tab'		=> 'portfolio'
);

//! Template Options
foreach($port_cats as $cat) {
	$setting[] = array(
		'id'		=> 'theme_portfolio_'.$cat->slug,
		'label'		=> $cat->name,
		'section'	=> 'portfolio-cat',
		'type'		=> 'select',
		'callback'	=> 'FeatherTheme::print_field_portcat_templates',
		'choices'	=> $port_cat_templates
	);
}


/* Portfolio : Category Template Guide
/*---------------------------------------------------------------------------*/
 
$setting['sections']['portfolio-guide'] = array(
	'title'		=> 'Template Guide',
	'tab'		=> 'portfolio'
);

//! Template Guide
$setting[] = array(
	'id'		=> 'theme_portfolio_templates',
	'label'		=> '',
	'section'	=> 'portfolio-guide',
	'callback'	=> 'FeatherTheme::print_field_port_template_guide',
);

endif; // End portfolio check


/* General : Custom Logo
/*---------------------------------------------------------------------------*/

$setting['sections']['custom-logo'] = array(
	'title'		=> 'Custom Logo',
	'tab'		=> 'general'
);

//! Logo URL
$setting[] = array(
	'id'		=> 'custom_logo',
	'label'		=> 'Logo URL',
	'section'	=> 'custom-logo',
	'type'		=> 'image'
);


/* General : Tagline
/*---------------------------------------------------------------------------*/

$setting['sections']['tagline'] = array(
	'title'		=> 'Tagline',
	'tab'		=> 'general'
);

//! Disable Tagline
$setting[] = array(
	'id'		=> 'disable_tagline',
	'label'		=> 'Disable',
	'section'	=> 'tagline',
	'type'		=> 'checkbox',
	'choices'	=> array(
		'disable_tagline' => 'Disable tagline'
	)
);

/* General : RSS Feed
/*---------------------------------------------------------------------------*/

$setting['sections']['rss-feed'] = array(
	'title'		=> 'RSS Feed',
	'tab'		=> 'general'
);

//! Feed URL
$setting[] = array(
	'id'		=> 'feed_url',
	'label'		=> 'Feed URL',
	'section'	=> 'rss-feed',
	'type'		=> 'text',
	'class'		=> 'regular-text'
);

/* General : Blog Home
/*---------------------------------------------------------------------------*/

$setting['sections']['blog'] = array(
	'title'		=> 'Blog Home',
	'tab'		=> 'general'
);

//! Feed URL
$setting[] = array(
	'id'		=> 'blog_index_content',
	'label'		=> 'Content',
	'section'	=> 'blog',
	'type'		=> 'radio',
	'choices'	=> array(
		'content' => 'Full Post',
		'excerpt' => 'Excerpt'
	)
);

/* General : Comments
/*---------------------------------------------------------------------------*/

$setting['sections']['comments'] = array(
	'title'		=> 'Comments',
	'tab'		=> 'general'
);

//! Disable Comments
$setting[] = array(
	'id'		=> 'disable_comments',
	'label'		=> 'Disable',
	'section'	=> 'comments',
	'type'		=> 'checkbox',
	'choices'	=> array(
		'comments_pages' => 'Disable comments on pages',
		'comments_posts' => 'Disable comments on posts'
	)
);

/* General : Custom Styles
/*---------------------------------------------------------------------------*/

$setting['sections']['custom-css'] = array(
	'title'		=> 'Custom Styles',
	'tab'		=> 'general'
);

//! Enable
$setting[] = array(
	'id'		=> 'customcss',
	'label'		=> 'Enable Customization',
	'section'	=> 'custom-css',
	'type'		=> 'checkbox',
	'choices'	=> array(
		'custom_styles' => 'Enable custom styles [ <strong>style-custom.css</strong> ]',
	)
);


/* General : Analytics
/*---------------------------------------------------------------------------*/

$setting['sections']['analytics'] = array(
	'title'		=> 'Analytics Script',
	'tab'		=> 'general'
);

//! Script Location
$setting[] = array(
	'id'		=> 'analytics_location',
	'label'		=> 'Script Location',
	'section'	=> 'analytics',
	'type'		=> 'radio',
	'choices'	=> array(
		'header' => 'Header',
		'footer' => 'Footer'
	)
);

//! Script
$setting[] = array(
	'id'		=> 'analytics_script',
	'label'		=> 'Analytics Script',
	'section'	=> 'analytics',
	'type'		=> 'textarea',
	'rows'		=> '4'
);
